<template>
    <div>
        <a-upload name="file" accept=".txt,.pdf,.doc,.docx,image/jpeg,image/jpg,image/png,.xlsx,.xls,.ppt,.zip,.rar" :multiple="false" :default-file-list="defaultFileList" :action="action" @change="uploadChange">
            <a-button>
                <a-icon type="upload"/>
                选择附件
            </a-button>
        </a-upload>
    </div>
</template>
<script>
export default {
    name: "uploadFile",
    data() {
        return {
            action:this.$config.baseURL+'/file/upload/',
            defaultFileList:[],
        }
    },
    methods:{
        uploadChange({file,fileList,event}){
            console.log(file)

        },
    }
}
</script>
<style scoped lang="scss">

</style>
